﻿namespace VirtualTournaments.MatchProvider
{
	public class ShowableTeam
	{
		public string teamID;
		public string teamName;
		public string teamColor;
		private ShowableParticipant[] participantsInTeam;

		public ShowableTeam(string xTeamID, string xTeamName, string xTeamColor)
		{
			teamID = xTeamID;
			teamName = xTeamName;
			teamColor = xTeamColor;
			participantsInTeam = new ShowableParticipant[5];
		}

		public void setParticipants(ShowableParticipant[] xTeamParticipants)
		{
			participantsInTeam = xTeamParticipants;
		}

		public void addParticipantPosition(int participantIndex, System.Drawing.Point point)
		{
			participantsInTeam[participantIndex - 1].addPoint(point);
		}


		public ShowableParticipant[] getParticipants()
		{
			return participantsInTeam;
		}

		public void setParticipantsPosition(int p)
		{
			foreach (ShowableParticipant participant in participantsInTeam)
				participant.setPosition(p);
		}

		public string getParticipantName(int p_2)
		{
			return this.participantsInTeam[p_2].participantName;
		}

		public ShowableParticipant getParticipant(int p_2)
		{
			return this.participantsInTeam[p_2];
		}
	}
}
